{% load static %}

<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>线上线下旅游系统</title>
    <meta name="description" content="Katen - Minimal Blog & Magazine HTML Theme">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {#	<link rel="shortcut icon" type="image/x-icon" href="contents/images/favicon.png">#}

    <!-- STYLES -->
    <link rel="stylesheet" href="{% static 'contents/css/bootstrap.min.css' %}" type="text/css" media="all">
    <link rel="stylesheet" href="{% static 'contents/css/all.min.css' %}" type="text/css" media="all">
    <link rel="stylesheet" href="{% static 'contents/css/slick.css' %}" type="text/css" media="all">
    <link rel="stylesheet" href="{% static 'contents/css/simple-line-icons.css' %}" type="text/css" media="all">
    <link rel="stylesheet" href="{% static 'contents/css/style.css' %}" type="text/css" media="all">

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<!-- preloader -->
<div id="preloader">
    <div class="book">
        <div class="inner">
            <div class="left"></div>
            <div class="middle"></div>
            <div class="right"></div>
        </div>
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</div>

<!-- site wrapper -->
<div class="site-wrapper">

    <div class="main-overlay"></div>

    <!-- header -->
    <header class="header-default">
        <nav class="navbar navbar-expand-lg">
            <div class="container-xl">
                <!-- site logo -->
                <a class="navbar-brand" href="index.html"><img src="{% static 'contents/images/logo.svg' %}"
                                                               alt="logo"/></a>

                <div class="collapse navbar-collapse">
                    <!-- menus -->
                    <ul class="navbar-nav mr-auto">
                        <li class="nav-item dropdown active">
                            <a class="nav-link dropdown-toggle" href="#">主页</a>

                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="category.html">旅行记忆</a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link" href="contact.html">联系方式</a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link" href="contact.html">机票查询</a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link" href="contact.html">天气预报</a>
                        </li>
                    </ul>
                </div>

                <!-- header right section -->
                <div class="header-right">
                    <!-- social icons -->
                    <!--
                    <ul class="social-icons list-unstyled list-inline mb-0" id="nickname-or-login">
                        <li class="list-inline-item"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                        <li class="list-inline-item"><a href="#"><i class="fab fa-twitter"></i></a></li>
                        <li class="list-inline-item"><a href="#"><i class="fab fa-instagram"></i></a></li>
                        <li class="list-inline-item"><a href="#"><i class="fab fa-pinterest"></i></a></li>
                        <li class="list-inline-item"><a href="#"><i class="fab fa-medium"></i></a></li>
                        <li class="list-inline-item"><a href="#"><i class="fab fa-youtube"></i></a></li>
                    </ul>
                    -->
                    {% if user.is_authenticated %}
                        <ul class="social-icons list-unstyled list-inline mb-0">
                            <li class="list-inline-item">
                                {% if other_info %}
                                    <a class="nav-link"
                                       href="javascript:void(0);">您好，{{ nickname }}({{ other_info }})</a>

                                {% else %}
                                    <a class="nav-link" href="javascript:void(0);">您好，{{ nickname }}</a>

                                {% endif %}
                            </li>
                            <li class="list-inline-item">
                                <a class="nav-link" href="{% url 'login:quit' %}">注销</a>
                            </li>
                        </ul>

                    {% else %}
                        <!--登录注册按钮-->
                        <ul class="social-icons list-unstyled list-inline mb-0">
                            <li class="list-inline-item">
                                <a class="nav-link" href="{% url 'login:login' %}">登录</a>
                            </li>
                            <li class="list-inline-item">
                                <a class="nav-link" href="{% url 'login:register' %}">注册</a>
                            </li>
                        </ul>
                    {% endif %}

                    <!-- header buttons -->
                    <div class="header-buttons">
                        <button class="search icon-button">
                            <i class="icon-magnifier"></i>
                        </button>
                        <button class="burger-menu icon-button">
                            <span class="burger-icon"></span>
                        </button>
                    </div>
                </div>
            </div>
        </nav>
    </header>

    <!-- hero section -->
    <section id="hero">

        <div class="container-xl">

            <div class="row gy-4">

                <div class="col-lg-8">

                    <!-- featured post large -->
                    <div class="post featured-post-lg">
                        <div class="details clearfix">
                            <a href="category.html" class="category-badge">旅行记忆</a>
                            <h2 class="post-title"><a href="blog-single.html">美丽的世界等待你来探索</a></h2>
                            <ul class="meta list-inline mb-0">
                                <li class="list-inline-item"><a href="#">张航瑞</a></li>
                                <li class="list-inline-item">2021.3.29</li>
                            </ul>
                        </div>
                        <a href="blog-single.html">
                            <div class="thumb rounded">
                                <div class="inner data-bg-image"
                                     data-bg-image="{% static 'contents/images/posts/featured-lg.jpg' %}"></div>
                            </div>
                        </a>
                    </div>

                </div>

                <div class="col-lg-4">

                    <!-- post tabs -->
                    <div class="post-tabs rounded bordered">
                        <!-- tab navs -->
                        <ul class="nav nav-tabs nav-pills nav-fill" id="postsTab" role="tablist">
                            <li class="nav-item" role="presentation">
                                <button aria-controls="popular" aria-selected="true" class="nav-link active"
                                        data-bs-target="#popular" data-bs-toggle="tab" id="popular-tab" role="tab"
                                        type="button">订单
                                </button>
                            </li>
                            <li class="nav-item" role="presentation">
                                <button aria-controls="recent" aria-selected="false" class="nav-link"
                                        data-bs-target="#recent" data-bs-toggle="tab" id="recent-tab" role="tab"
                                        type="button">行程
                                </button>
                            </li>
                        </ul>
                        <!-- tab contents -->
                        <div class="tab-content" id="postsTabContent">
                            <!-- loader -->
                            <div class="lds-dual-ring"></div>
                            <!-- popular posts -->
                            <div aria-labelledby="popular-tab" class="tab-pane fade show active" id="popular"
                                 role="tabpanel">
                                <!-- post -->
                                {% if user.is_authenticated %}
                                    {% for booking in booking_list %}
                                        <div class="post post-list-sm circle">
                                            <div class="thumb circle">
                                                <a href="javascript:void(0);">
                                                    <div class="inner">
                                                        <img src="{% static 'contents/images/posts/tabs-1.jpg' %}"
                                                             alt="post-title"/>
                                                    </div>
                                                </a>
                                            </div>
                                            <div class="details clearfix">
                                                <h6 class="post-title my-0"><a
                                                        href="blog-single.html">{{ booking.corp }}
                                                    订单{{ booking.id }}</a></h6>
                                                <ul class="meta list-inline mt-1 mb-0">
                                                    <li class="list-inline-item">价格：{{ booking.price }}</li>
                                                </ul>
                                            </div>
                                        </div>

                                    {% endfor %}

                                {% else %}
                                    <div class="post post-list-sm circle">

                                        请先登录
                                    </div>

                                {% endif %}


                            </div>
                            <!-- recent posts -->
                            <div aria-labelledby="recent-tab" class="tab-pane fade" id="recent" role="tabpanel">
                                <!-- post -->

                                {% if user.is_authenticated %}
                                    {% for trip in trip_list %}
                                        <div class="post post-list-sm circle">
                                            <div class="thumb circle">
                                                <a href="javascript:void(0);">
                                                    <div class="inner">
                                                        <img src="{% static 'contents/images/posts/tabs-2.jpg' %}"
                                                             alt="post-title"/>
                                                    </div>
                                                </a>
                                            </div>
                                            <div class="details clearfix">
                                                <h6 class="post-title my-0"><a
                                                        href="blog-single.html">{{ trip.attraction }}</a></h6>
                                                <ul class="meta list-inline mt-1 mb-0">
                                                    <li class="list-inline-item">{{ trip.date_start }}
                                                        - {{ trip.date_end }}</li>
                                                </ul>
                                            </div>
                                        </div>

                                    {% endfor %}

                                {% else %}
                                    <div class="post post-list-sm circle">

                                        请先登录
                                    </div>

                                {% endif %}


                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>

    </section>

    <!-- footer -->
    <footer>
        <div class="container-xl">
            <div class="footer-inner">
                <div class="row d-flex align-items-center gy-4">
                    <!-- copyright text -->
                    <div class="col-md-4">
                        <span class="copyright">© 2021 Katen. Template by ThemeGer.</span>
                    </div>

                    <!-- social icons -->
                    <div class="col-md-4 text-center">
                        <ul class="social-icons list-unstyled list-inline mb-0">
                            <li class="list-inline-item"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                            <li class="list-inline-item"><a href="#"><i class="fab fa-twitter"></i></a></li>
                            <li class="list-inline-item"><a href="#"><i class="fab fa-instagram"></i></a></li>
                            <li class="list-inline-item"><a href="#"><i class="fab fa-pinterest"></i></a></li>
                            <li class="list-inline-item"><a href="#"><i class="fab fa-medium"></i></a></li>
                            <li class="list-inline-item"><a href="#"><i class="fab fa-youtube"></i></a></li>
                        </ul>
                    </div>

                    <!-- go to top button -->
                    <div class="col-md-4">
                        <a href="#" id="return-to-top" class="float-md-end"><i class="icon-arrow-up"></i>Back to Top</a>
                    </div>
                </div>
            </div>
        </div>
    </footer>

</div><!-- end site wrapper -->

<!-- search popup area -->
<div class="search-popup">
    <!-- close button -->
    <button type="button" class="btn-close" aria-label="Close"></button>
    <!-- content -->
    <div class="search-content">
        <div class="text-center">
            <h3 class="mb-4 mt-0">Press ESC to close</h3>
        </div>
        <!-- form -->
        <form class="d-flex search-form">
            <input class="form-control me-2" type="search" placeholder="Search and press enter ..." aria-label="Search">
            <button class="btn btn-default btn-lg" type="submit"><i class="icon-magnifier"></i></button>
        </form>
    </div>
</div>

<!-- canvas menu -->
<div class="canvas-menu d-flex align-items-end flex-column">
    <!-- close button -->
    <button type="button" class="btn-close" aria-label="Close"></button>

    <!-- logo -->
    <div class="logo">
        <img src="{% static 'contents/images/logo.svg' %}" alt="Katen"/>
    </div>

    <!-- menu -->
    <nav>
        <ul class="vertical-menu">
            <li class="active">
                <a href="index.html">主页</a>
                <ul class="submenu">
                    <li><a href="index.html">Magazine</a></li>
                    <li><a href="personal.html">Personal</a></li>
                    <li><a href="personal-alt.html">Personal Alt</a></li>
                    <li><a href="minimal.html">Minimal</a></li>
                    <li><a href="classic.html">Classic</a></li>
                </ul>
            </li>
            <li><a href="category.html">Lifestyle</a></li>
            <li><a href="category.html">旅行记忆</a></li>
            <li>
                <a href="#">Pages</a>
                <ul class="submenu">
                    <li><a href="category.html">Category</a></li>
                    <li><a href="blog-single.html">Blog Single</a></li>
                    <li><a href="blog-single-alt.html">Blog Single Alt</a></li>
                    <li><a href="about.html">About</a></li>
                    <li><a href="contact.html">Contact</a></li>
                </ul>
            </li>
            <li><a href="contact.html">Contact</a></li>
        </ul>
    </nav>

    <!-- social icons -->
    <ul class="social-icons list-unstyled list-inline mb-0 mt-auto w-100">
        <li class="list-inline-item"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
        <li class="list-inline-item"><a href="#"><i class="fab fa-twitter"></i></a></li>
        <li class="list-inline-item"><a href="#"><i class="fab fa-instagram"></i></a></li>
        <li class="list-inline-item"><a href="#"><i class="fab fa-pinterest"></i></a></li>
        <li class="list-inline-item"><a href="#"><i class="fab fa-medium"></i></a></li>
        <li class="list-inline-item"><a href="#"><i class="fab fa-youtube"></i></a></li>
    </ul>
</div>

<!-- JAVA SCRIPTS -->
<script src="{% static 'contents/js/jquery.min.js' %}"></script>
<script src="{% static 'contents/js/popper.min.js' %}"></script>
<script src="{% static 'contents/js/bootstrap.min.js' %}"></script>
<script src="{% static 'contents/js/slick.min.js' %}"></script>
<script src="{% static 'contents/js/jquery.sticky-sidebar.min.js' %}"></script>
<script src="{% static 'contents/js/custom.js' %}"></script>

</body>
</html>